package abstractBeanFactory.defaultBeanFactory;

import abstractBeanFactory.AbstractTankBeanFactory;
import abstractBeanFactory.BaseBullet;
import abstractBeanFactory.BaseExplode;
import abstractBeanFactory.BaseTank;
import tank.Bullet;
import tank.Dir;
import tank.Explode;
import tank.Group;
import tank.Tank;
import tank.TankFrame;

public class DefaultBeanFactory extends AbstractTankBeanFactory {
	private static final DefaultBeanFactory DEFAULT_BEANFACTORY = new DefaultBeanFactory();
	private DefaultBeanFactory(){}
	public static DefaultBeanFactory getInstance() {
		return DEFAULT_BEANFACTORY;
	}
	@Override
	public BaseTank creatTank(int x, int y, Dir dir, Group group, TankFrame tf) {
		return new Tank(x, y, dir, group, tf);
	}
	@Override
	public BaseBullet creatBullet(int x, int y, Dir dir, Group group, TankFrame tf) {
		return new Bullet(x,y,dir,group,tf);
	}
	@Override
	public BaseExplode creatExplode(int x, int y, TankFrame tf) {
		return new Explode(x,y,tf);
	}
	
}
